<?php

class LanguageTable extends Doctrine_Table
{

	protected $abbr = array();

	public function getAbbr(){

		if(!$this->abbr){
			$q = Doctrine_Query::create()
				->select('l.abr, l.id')
				->from('Language l')
				->setHydrationMode(Doctrine::HYDRATE_ARRAY);

			foreach($q->execute() as $item){
				$this->abbr[$item['id']] = $item['abr'];
			}
		}

		return $this->abbr;
	}



}